package com.smart.manager.product.entities.views;

import com.smart.common.entities.core.BaseView;
import com.smart.manager.product.entities.enums.PigstyKind;
import com.smart.manager.product.entities.enums.ProfileStage;
import io.ebean.annotation.View;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotBlank;


/**
 * 游戏管理 品种资料
 * @author leo
 * @date 2023/09/07
 */
@Data
@Entity
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@View(name = "product_pig_level")
public class PigLevelView extends BaseView {

    /**
     * 品种代码
     */
    @Id
    @NotBlank(message = "等级序号 不能为空")
    @ApiModelProperty("等级序号")
    private Long id;

    @ApiModelProperty("成长天数")
    private Integer day;

    @ApiModelProperty("喂养类型")
    private PigstyKind kind;

    @ApiModelProperty("所属阶段")
    private ProfileStage stage;

    @ApiModelProperty("预估体重KG")
    private Integer weight;

    @ApiModelProperty("等级数值")
    private Integer levelNum;

    @ApiModelProperty("是否允许宰杀")
    private Boolean allowKill;

    @ApiModelProperty("等级所属品种")
    @ManyToOne
    @JoinColumn(name = "breed",referencedColumnName = "code")
    private PigBreedView breed;

    @ApiModelProperty("喂养提示语")
    private String msg;

}